package com.service;

import com.domain.Book;
import com.domain.User;
import com.entity.PageResult;
import org.apache.ibatis.annotations.Param;

public interface BookService {

    //新书推荐5本
    public PageResult selectNewBooks(int pageNum, int PageSize);

    //显示书籍详细
    public Book findById(String id);

    //借阅书籍
    public Integer borrowBook(Book book);

    //搜索
    public PageResult search(Book book, int pageNum, int pageSize);

    //新增
    public Integer addBook(@Param("book") Book book);

    //编辑
    public Integer editBook(Book book);

    //查询借阅
    public PageResult searchBorrowed(Book book, User user, Integer pageNum, Integer pageSize);

    //归还书
    public boolean returnBook(String id, User user);

    //确认归还
    public Integer returnConfirm(String id);

    //分类
    public PageResult findTypeAll(Integer pageNum, Integer pageSize);

    //分类搜索
    public PageResult searchBooktype(Book book, int pageNum, int pageSize);




}
